package com.zcah.mask.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zcah.common.vo.R;
import com.zcah.mask.service.MaskService;
import com.zcah.mask.vo.MaskVO;


/**
 * 数据库与文本脱敏类
 * @author ke
 *
 */
@RestController
@RequestMapping("/v1/mask")
public class MaskController {

	@Autowired
	private MaskService maskService;
	
	@PostMapping("/db")
	public R maskDb(@RequestBody MaskVO maskVo) {
		maskService.startDbMaskJob(maskVo);
		return R.ok();
	}
	
	
	@PostMapping("/file")
	public R maskFile(@RequestBody MaskVO maskVo) {
		maskService.startFileMaskJob(maskVo);
		return R.ok();
	}
	
}
